package com.cloud.drore.eboss.supplier.service.impl;

import com.cloud.drore.eboos.common.base.BaseServiceImpl;
import com.cloud.drore.eboos.common.base.MyMapper;
import com.cloud.drore.eboos.common.base.PagePo;
import com.cloud.drore.eboos.common.base.ResultMessage;
import com.cloud.drore.eboss.supplier.mapper.TicketStockMapper;
import com.cloud.drore.eboss.supplier.service.ITicketStockService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 浙江卓锐科技股份有限公司 版权所有  Copyright 2018<br>
 *
 * @Description: <br>
 * @Project: eboos <br>
 * @CreateDate: Created in 2018/1/8 16:33 <br>
 * @Author: <a href="575842778@qq.com">郑永涛</a>
 */
@Service
public class TicketStockServiceImpl extends BaseServiceImpl implements ITicketStockService {

    @Autowired
    TicketStockMapper ticketStockMapper;

    @Override
    public MyMapper getMapper() {
        return ticketStockMapper;
    }

    public ResultMessage findByName(PagePo page) {
        PageHelper.startPage(page);
        List list = ticketStockMapper.selectAll();
        return new ResultMessage(new PageInfo<>(list));
    }

}